<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="ftm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: holle
  Date: 2020/6/13
  Time: 16:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <title>图书详情页面</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript"
            src="<%=basePath%>static/js/jquery-1.12.4.min.js"></script>
    <link
            href="<%=basePath%>static/bootstrap-3.3.7-dist/css/bootstrap.min.css"
            rel="stylesheet">
    <script type="text/javascript"
            src="<%=basePath%>static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

</head>
<body>
<center>
    <h2>图书详情页面</h2>
    <div style="width: 143px;height: 143px;">
        <img src="${book.img_path}" width="200px" height="300px" class="img-circle">
    </div>
    <p/>
    <form class="form-horizontal" role="form" style="width: 600px" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label class="col-sm-2 control-label">图书名字</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="firstname" placeholder="请输入名字" name="name" value="${book.book_name}">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">图书出版社</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="score" placeholder="请输入成绩"  value="${book.public_dept}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">图书价格</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="address" placeholder="请输入地址" value="${book.book_price}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">出版日期</label>
            <div class="col-sm-10">
                <input type="text" class="form-control"placeholder="请输入生日" name="bitthday"  value="<ftm:formatDate value="${book.public_date}" pattern="yyyy-MM-dd" />">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">作者</label>
            <div class="col-sm-10">
                <input type="text" class="form-control"  placeholder="请输入入学日期" value="${book.book_auth}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">简介</label>
            <div class="col-sm-12">
                <TEXTAREA name=description cols="40" rows="5">${book.summary}</TEXTAREA>
            </div>
        </div>
        库存<div>${book.storehouse.book_count}</div>
        <button  class="btn btn-primary" >
            <a href="cart/gocart?bookid=${book.bookid}" style="color: white;text-decoration: none">加入购物车</a></button>
         <button  class="btn btn-primary" >
            <a href="godelsto/gobuy" style="color: white;text-decoration: none"> 购买</a></button>
    </form>
</center>
</body>
</html>

